﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VideoNetApplication.Common;
using VideoNetApplication.Common.Helper;
using VideoNetApplication.Common.Service;

namespace VideoNetApplication
{
    public partial class ViewRecruitDetail :BasePage
    {
        private int nid = 0;
        public V_RecruitStudent news;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["nid"] != null && StringUtils.IsNumeric(Request["nid"]))
            {
                nid = Convert.ToInt32(Request["nid"]);
            }
            GetNewsDetail();
        }

        public void GetNewsDetail()
        {
            var newsService = new RecruitStudentService();
             news = newsService.GetRecruitById(nid);
             if (news != null)
             {
                 ltrAuthor.Text = news.Author;
                 ltrUptime.Text = DateTime.Parse(news.CreateTime.ToString()).ToString("yyyy-MM-dd");
                 ltrContent.Text = news.RecruitContent;
                 ltrTitle.Text = news.RecruitTitle;
             }


        }
    }
}
